<!DOCTYPE html>
<html>
<head>
    <title>Events</title>
    <meta charset="utf-8">
    <link href="../content/shared/styles/examples-offline.css" rel="stylesheet">
    <link href="../../styles/kendo.common.min.css" rel="stylesheet">
    <link href="../../styles/kendo.rtl.min.css" rel="stylesheet">
    <link href="../../styles/kendo.default.min.css" rel="stylesheet">
    <link href="../../styles/kendo.dataviz.min.css" rel="stylesheet">
    <link href="../../styles/kendo.dataviz.default.min.css" rel="stylesheet">
    <script src="../../js/jquery.min.js"></script>
    <script src="../../js/kendo.all.min.js"></script>
    <script src="../content/shared/js/console.js"></script>
    <script>
        
    </script>
    
    
</head>
<body>
    
        <a class="offline-button" href="../index.html">Back</a>
    
            
        <div id="example">
            
            <div id="grid"></div>

            <script>
                function onChange(arg) {
                    var selected = $.map(this.select(), function(item) {
                        return $(item).text();
                    });

                    kendoConsole.log("Selected: " + selected.length + " item(s), [" + selected.join(", ") + "]");
                }

                function onDataBound(arg) {
                    kendoConsole.log("Grid data bound");
                }

                function onDataBinding(arg) {
                    kendoConsole.log("Grid data binding");
                }

                $(document).ready(function () {
                    $("#grid").kendoGrid({
                        dataSource: {
                            transport: {
                                read: {
                                    url: "http://demos.telerik.com/kendo-ui/service/Products",
                                    dataType: "jsonp"
                                }
                            },
                            pageSize: 20
                        },
                        height: 550,
                        change: onChange,
                        dataBound: onDataBound,
                        dataBinding: onDataBinding,
                        selectable: "multiple cell",
                        pageable: true,
                        sortable: true,
                        columns: [
                            {
                                field: "ProductName",
                                title: "Product Name"
                            },
                            {
                                field: "UnitPrice",
                                title: "Unit Price",
                                format: "{0:c}"
                            },
                            {
                                field: "UnitsInStock",
                                title: "Units In Stock"
                            }
                        ]
                    });
                });
            </script>
            <div class="box">
                <h4>Console log</h4>
                <div class="console"></div>
            </div>
        </div>
        

    
    
</body>
</html>
